Skip to content

fix(manifest): host documents project the launch record — kinds, order, transport, pointer (AB6017); install re-measures mode; one portable path rule (#604 follow-up) - #650

Merged
ScriptedAlchemy merged 5 commits into
mainfrom
fix/604-launch-agreement
Sep 5, 2026
Merged

fix(manifest): host documents project the launch record — kinds, order, transport, pointer (AB6017); install re-measures mode; one portable path rule (#604 follow-up)#650
ScriptedAlchemy merged 5 commits into
mainfrom
fix/604-launch-agreement

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Follow-up to #604 (merged as 632847a39b at head bb241b2818, before the Pass 8/9 self-review fixes on that branch landed). This PR carries exactly those fixes, cherry-picked onto main (#647/#649 resolved in docs/diagnostics.md and install/receipt.ts imports). Closes the loop on #592 step 3 / #555 W2-S3; #639 (S4 npm root) is unaffected — it stacks on the merged #604.

What changes

Area Before (main) Now
Launch entry kinds both readers checked launch.entry/worker were files[] rows the entry must be the row its server kind starts (bundle for compiled, prebuilt for prebuilt) and the worker a bundle row — parseFileKinds + shared artifactManifestFileKinds in web-host/manifest.ts, used by build/manifest.ts
Host document ↔ launch record validateMcpCoherence checked references individually; a document could rename a server, swap two records' entries, prepend an artifact-local bootstrap, or reach a launchable server over HTTP AB6017: every launchable manifest server for the target appears in the document under its name (validateDeclaredServersPresent); each document server's artifact-local paths, in launch order, start with the record's entry and pass the record's artifact arguments in order (validateLaunchAgreement; flags and literals may interleave); a non-stdio document server for a launchable record is refused; projections[host].documents.mcp must point at the target's MCP document whenever either exists
mcp run fell back to the manifest record when the document named no such server the host document line is the launch; with drift refused at validation the fallback was unreachable for any validated root and is deleted (hostMcpDocument throws for a missing document or server)
install/doctor inventory manifestInventory compared sha256 only, so a post-build chmod on an indexed row installed as authoritative matchesManifestFile (bytes, mode, digest) as validate-artifact uses; AB7001 names the differing row
Path rule manifest parser admitted names the receipt reader rejects (NUL, CON.txt, a:b, trailing dot/space, control chars) one isPortablePathSegment (core/paths.ts) behind isRelocatablePosixPath (both parsers), isReceiptPath, and the JSON Schema relativePath pattern

Docs: docs/diagnostics.md (AB6017, AB7001), website/docs/{en,zh}/reference/artifact-manifest.mdx (lean-reader row, files[].path rule, AB7001). Changeset: patch.

Tests

  • tests/web-manifest.test.ts, tests/manifest.test.ts: wrong-kind entry, prebuilt entry at a bundle, worker as copy, duplicate file paths, unknown kind, Windows device name.
  • tests/artifact-validator.test.ts: agreeing document with interleaved literals → none; swapped entry, prepended bootstrap, out-of-order artifact args, renamed server, streamable-http document server, absent documents.mcp pointer → AB6017 with the exact message.
  • tests/build-compose.test.ts: mcp run refuses a root whose document aliases the server (AB6017, nothing spawned); custom adapter flag order still launches.
  • tests/install.test.ts: AB7001 on an executable bit the row does not declare; tests/support/install-fixture.ts, tests/public-api-packed.test.ts record mode and bundle kinds the way the compiler does.
  • tests/manifest-schema.test.ts: five portable-segment parity rules + device names in any case and superscript digits rejected by both parser and schema; COM10.log, console.txt, nulled/index.json, lpt.txt accepted by both.
  • tests/artifact-inspection-service.test.ts: the pointerless-host case is refused at publish by validation.

Gates

On 17df7f0d77 + changeset: pnpm install --frozen-lockfile && pnpm build && pnpm typecheck && pnpm lint && pnpm test:unit green (4237 passed); integration: combined proof, host install proofs, prebuilt payload, web command, compile evidence, artifact validator, dev host install, build, build-compose, dev web-host routes, package build (234 passed); pnpm test:packed (38) green; pnpm docs:site:build green (parity ok).

Self-review

These commits were reviewed on the #604 branch before it merged out from under them:

  • Pass 8 (generalPurpose on gpt-5.6-sol-medium, on bb241b2818): 3 must-fix — launch entry kind unchecked / records swappable without document agreement; manifestInventory digest-only; manifest path rule wider than the receipt rule — all fixed here.
  • Pass 9 (Sol, on the Pass 8 fixes): 3 must-fix (unordered agreement; non-stdio document server skipped; validation read runtime.manifestPath while mcp run reads the pointer) + 2 should-fix (AB6017 doc wording; device-name parity coverage) — all fixed in 17df7f0d77. Re-run on the result: no findings.
  • Deslop: gpt-5.6-sol-medium, 10 edits applied (13 proposed; 3 reverted where the comment gave the reason rather than restating the code).

… to; host documents agree with the launch record; install re-measures bytes and mode; one portable path rule for files[] and receipts
…rder, over stdio, from the manifest's own pointer (AB6017); schema device-name parity cases
@changeset-bot

changeset-bot Bot commented Sep 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 88493de

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agent-bundle Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@pkg-pr-new

pkg-pr-new Bot commented Sep 5, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@650
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/create-agent-bundle@650
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/rsc-markdown-stream@650
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@650

commit: 88493de

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant